<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>方正教务管理系统</title>
<link rel="stylesheet" href="css/public.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
	<!--头部-->
	<header class="publicHeader">
		<h1>方正教务管理系统</h1>
		<div class="publicHeaderR">
			<p>
				<span>下午好！</span><span style="color: #fff21b"> ${name }</span> ,
				欢迎你！
			</p>
			<a href="login.jsp">退出</a>
		</div>
	</header>
	<!--时间-->
	<section class="publicTime">
		<span id="time">2015年1月1日 11:11 星期一</span> <a href="#">温馨提示：为了能正常浏览，请使用高版本浏览器！（IE10+）</a>
	</section>
	<!--主体内容-->
	<section class="publicMian ">
		<div class="left">
			<h2 class="leftH2">
				<span class="span1"></span>功能列表 <span></span>
			</h2>
			<nav>
				<%@ include file="leftView.jsp"%>
			</nav>
		</div>
		<div class="right">
			<div class="location">
				<strong>你现在所在的位置是:</strong> <span>用户管理页面</span>
			</div>
			<form action="findUser">
				<div class="search">
					<span>用户名：</span> <input type="text" name="userName" placeholder="请输入用户名" /> <span>性别：</span>
					<select name="sex">
						<option value="0">--请选择--</option>
						<option value="1">男</option>
						<option value="2">女</option>
					</select><span>用户类型：</span><select name="userRole">
						<option value="0">--请选择--</option>
						<option value="1">管理员</option>
						<option value="2">经理</option>
						<option value="3">普通用户</option>
					</select> <input type="submit" value="查询" style="width: 80px" /> <a
						href="userAdd.jsp" style="width: 75px">添加用户</a>
				</div>
			</form>
			<!--用户-->
			<table class="providerTable" cellpadding="0" cellspacing="0">
				<tr class="firstTr">
					<th width="10%">用户编码</th>
					<th width="20%">用户名称</th>
					<th width="10%">性别</th>
					<th width="10%">年龄</th>
					<th width="10%">电话</th>
					<th width="10%">用户类型</th>
					<th width="30%">操作</th>
				</tr>
				<!-- 
				<tr>
					<td>hanlu</td>
					<td>韩露</td>
					<td>女</td>
					<td>20</td>
					<td>15918230478</td>
					<td>经理</td>
					<td><a href="userView.jsp"><img src="images/read.png"
							alt="查看" title="查看" /></a> <a href="userUpdate.jsp"><img
							src="images/xiugai.png" alt="修改" title="修改" /></a> <a href="#"
						class="removeUser"><img src="images/schu.png" alt="删除"
							title="删除" /></a></td>
				</tr>
				 -->

				<c:forEach items="${userList }" var="u">
					<tr>
						<td>${u.userCode }</td>
						<td>${u.userName }</td>
						<!-- <td>${u.gender }</td> -->
						<c:if test="${u.gender == 1}">
							<td>男</td>
						</c:if>
						<c:if test="${u.gender == 2}">
							<td>女</td>
						</c:if>
						<td>${u.age }</td>
						<td>${u.phone }</td>
						<!-- <td>${u.userRole }</td> -->
						<c:if test="${u.userRole == 1}">
							<td>管理员</td>
						</c:if>
						<c:if test="${u.userRole == 2}">
							<td>经理</td>
						</c:if>
						<c:if test="${u.userRole == 3}">
							<td>普通用户</td>
						</c:if>

						<td><a href="http://localhost:8080/wlsf/userView?id=${u.id }"><img
								src="images/read.png" alt="查看" title="查看" /></a> <a
							href="http://localhost:8080/wlsf/toUserUpdate?id=${u.id }"><img
								src="images/xiugai.png" alt="修改" title="修改" /></a> <a
							href="http://localhost:8080/wlsf/userDelete?id=${u.id }"
							class="removeUser"><img src="images/schu.png" alt="删除"
								title="删除" /></a></td>
					</tr>
				</c:forEach>
			</table>

		</div>
	</section>

	<!--点击删除按钮后弹出的页面-->
	<div class="zhezhao"></div>
	<div class="remove" id="removeUse">
		<div class="removerChid">
			<h2>提示</h2>
			<div class="removeMain">
				<p>你确定要删除该用户吗？</p>
				<a href="#" id="yes">确定</a> <a href="#" id="no">取消</a>
			</div>
		</div>
	</div>

	<footer class="footer"> Version@Java面向监狱编程从入门到入狱 </footer>

	<script src="js/jquery.js"></script>
	<script src="js/js.js"></script>
	<script src="js/time.js"></script>

</body>
</html>